/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package projet2_ro;

import java.util.ArrayList;

/**
 * This class represents a set of variables
 * @author Houdemer and Rigon
 */
public class Ensemble {
    private ArrayList<Integer> elements;
    
    
    public Ensemble(){
        elements = new ArrayList<Integer>();
    }
    
    public void addElement(int elt){
        elements.add(elt);
    }
    
    public int getElement(int index){
        return elements.get(index);
    }

    public int size(){
        return elements.size();
    }

    public boolean contains(int elt){
        for(Integer i : elements){
            if(i == elt){
                return true;
            }
        }
        return false;
    }

    public String toString(){
        String res = "";
        for(Integer i : elements){
            res += i;
        }
        return res;
    }
    
}
